<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>

    // 浅比较：比较的是内存地址
    const aa = [1, 2, 3]
    const bb = aa;


    // 深比较： 比较每个值
    // 1. 遍历比较每项元素
    // 2. 转换为字符串再比较
    const list1 = [1, 2, 3]
    const list2 = [1, 2, 3]
    const list1Str = JSON.stringify(list1)
    const list2Str = JSON.stringify(list2)

    // console.log('list1Str  ----->  ', list1Str);
    // console.log('list2Str  ----->  ', list2Str);








  </script>
</body>

</html>